home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
paslib.arc
/
CIRCLE.INC
< prev
next >
Wrap
Text File
|
1986-11-03
|
1KB
|
32 lines
PROCEDURE CIRCLE(H,K,R,CLR : INTEGER);
VAR
X: INTEGER;
Y: INTEGER;
GIBBAGE1 : REAL;
X2 : INTEGER;
Y2 : INTEGER;
FIRSTRUN : BOOLEAN;
MD : INTEGER;
BEGIN
IF MODE THEN MD := 2;
FIRSTRUN := TRUE;
FOR X := H-R TO H+R DO
BEGIN
GIBBAGE1:= SQRT(ABS(SQR(R)-SQR(X-H)))+H;
Y:= K-ROUND(GIBBAGE1);
IF FIRSTRUN THEN
BEGIN
X2 := X;
Y2 := Y;
END;
FIRSTRUN := FALSE;
DRAW(X,Y+H,X2,Y2+H,CLR);
DRAW(X,K-Y,X2,K-Y2,CLR);
PLOT(X,Y+H,CLR);
PLOT(X,K-Y,CLR);
X2:=X;
Y2:=Y;
END;
END;